var url = require('url');

function init(request, response) {
    
    if(request.method.toLowerCase() == 'get') {
        var query = url.parse(request.url, true).query;
        var data = {'code':100,'msg':'success','data':{}};
        var datastringify = JSON.stringify(data);
        if(query && query.callback) {
            response.end(query.callback + '(' + datastringify + ')');
        } else {
            response.end(datastringify);
        }
    }

}

exports.init = init;